<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>  

<script type="text/javascript"
	src='<c:url value="/resources/js/jquery-ui-1.8.16.custom.min.js"/>'></script>
<link rel="stylesheet"
	href='<c:url value="/resources/css/redmond/jquery-ui-1.8.16.custom.css"/>' />
<script type="text/javascript"
	src='<c:url value="/resources/js/jquery.ui.datepicker-zh-CN.js"/>'></script>
<script type="text/javascript"
	src='<c:url value="/resources/js/members/addMemberPage.js"/>'></script>
	
	
<form:form modelAttribute="member" id="memberForm">

<fieldset>
<legend>新会员录入</legend>
<table class="nostyle">
	<tbody>
		<tr>
			<td><label><font color="red">*</font>银行卡号:</label></td><td><form:input path="memberCardNumber" id="memberCardNumber"/></td>
			<td><label><font color="red">*</font>身份证号码:</label></td><td><form:input path="idCardNumber" class="text-long"/></td>
		</tr>
		<tr>
			<td><label><font color="red">*</font>会员姓名:</label></td><td><form:input path="name" class="text-long"/></td>
			<td><label><font color="red">*</font>联系电话:</label></td><td><form:input path="phoneNumber" class="text-long"/></td>
		</tr>
		<tr>
			<td><label>家庭地址:</label></td><td><form:input path="address" class="text-long"/></td>
			<td><label><font color="red">*</font>业务员:</label></td>
			<td><select name="operatorID">
					<c:forEach items="${operatorList }" var="operator">
						<option value="${operator.id }">${operator.id } ${operator.name }</option>
					</c:forEach>
				</select>
			</td>
		</tr>
		<tr>
			<td><label><font color="red">*</font>购买产品:</label></td>
			<td>
				<select name="goodsID">
					<c:forEach items="${goodsList }" var="goods">
						<option value="${goods.id }">${goods.id } ${goods.name }</option>
					</c:forEach>
				</select>
			</td>
			<td><label><font color="red">*</font>消费金额:</label></td><td><form:input path="goodsPrice" id="costAmount" class="text-long"/></td>
		</tr>
		<tr>
			<td><label><font color="red">*</font>返利比例(%):</label></td><td><form:input path="profitReturnPercent" id="profitPercent" class="text-small" value="100"/><input type="button" id="calculateProfitAmount" value="计算返利"></td>
			<td><label><font color="red">*</font>返利金额(销售金额*返利比例):</label></td><td><form:input path="profitReturnAmount" id="profitAmount" class="text-long"/></td>
		</tr>
		<tr>
			<td><label><font color="red">*</font>建卡时间:</label></td><td><form:input id="createDate" path="createDateString" class="text-long" readonly="true"/></td>
			<td><label><font color="red">*</font>所属部门:</label></td>
			<td>
				<select name="departmentID">
					<c:forEach items="${departmentList }" var="department">
						<option value="${department.id }">${department.id } ${department.departmentName }</option>
					</c:forEach>
				</select>
			</td>
		</tr>
		<tr>
			<td><label>备注信息:</label></td>
			<th colspan="3"><form:textarea path="description" rows="4" cols="40"/></th>
		</tr>
		<tr>
			<td><label></label></td>
			<th colspan="4">	<input id="submitButton" type="button" value="提交" /></th>
		</tr>
	</tbody>
</table>
	
</fieldset>
</form:form>	

